<!DOCTYPE html>
<body>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<div id="log"></div>
<textarea style="white-space:pre-line">P1

P2

P3
</textarea>
<script>
test(function() {
    var textarea = document.querySelector('textarea');
    textarea.focus();
    textarea.setSelectionRange(7, 7); // Empty line between P2 and P3.
    eventSender.keyDown('Enter');
    eventSender.keyDown('ArrowUp');
    eventSender.keyDown('Enter');
    assert_equals(textarea.value, 'P1\n\nP2\n\n\n\nP3\n');
}, 'TEXTAREA with white-space:pre-line should not produce nbsp by Enter key');
</script>
</body>
